﻿using AutoMapper;
using Swork03_28.Api.Application.Commands.DeepCommand;
using Swork03_28.Domain.TraceableInfos;

namespace Swork03_28.Api.Extensions
{
    public class DeepProfile : Profile
    {
        public DeepProfile()
        {
            CreateMap<DeepFirmCreateCommand, FirmInfo>()
                .ForMember(destinationMember: x => x.Id, memberOptions: a =>
                {
                    a.MapFrom(mapExpression: map => map.companyId);
                }).ForMember(destinationMember: x => x.CompanyName, memberOptions: a => { a.MapFrom(mapExpression: map => map.companyName); })
            .ForMember(destinationMember: x => x.FirmType, memberOptions: a => { a.MapFrom(mapExpression: map => map.businessCode); })
            .ForMember(destinationMember: x => x.BatchId, memberOptions: a => { a.MapFrom(mapExpression: map => map.batchCode); })
            .ForMember(destinationMember: x => x.CampanyImage, memberOptions: a => { a.MapFrom(mapExpression: map => map.companyImage); });
        }

    }
}
